﻿@model LoginModel
@using SpotsHub.Gateway.Models.Customer;
@using Nop.Core;
@using Nop.Core.Infrastructure;
@using Nop.Core.Infrastructure.DependencyManagement;
@{
    Layout = null;

    //register URL with return URL (if specified)
    var registerUrl = Url.RouteUrl("Register");
    string url = null;
    if (!String.IsNullOrEmpty(this.Context.Request.QueryString["returnUrl"]))
    {
        url = this.Context.Request.QueryString["returnUrl"];
        var webHelper = EngineContext.Current.Resolve<IWebHelper>();
        registerUrl = webHelper.ModifyQueryString(registerUrl, "returnurl=" + HttpUtility.UrlEncode(this.Context.Request.QueryString["returnUrl"]), null);
    }
}
<section class="login-page">
    <div class="full-width-image"><img src="~/Content/images/free-membership.png" alt="Sign up today to receive one year free membership!" /></div>
    @using (Html.BeginForm("Login", "Customer", new { returnurl = url }))
    {
        <div class="container">
            @if (ViewBag.Messages != null && !String.IsNullOrEmpty(ViewBag.Messages))
            {
                @Html.Raw(ViewBag.Messages)
            }
            <div class="row login-content">
                <div class="col-xxs-12 col-xs-12 col-sm-12 col-md-4 col-lg-4">
                    <h3 class="page-title center">SpotsHUB Member Login</h3>
                    <div class="login-form">

                        @Html.HiddenFor(model => model.IsCheckout)
                        @Html.HiddenFor(model => model.IsDirectCheckout)
                        @if (Model.UsernamesEnabled)
                        {
                            <div class="login-username">
                                @Html.TextBoxFor(m => m.Username, new { @class = "username form-control", autofocus = "autofocus", @placeholder = "Username" })
                                @Html.ValidationMessageFor(m => m.Username)
                            </div>
                        }
                        else
                        {
                            <div class="login-username input-group">
                                <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
                                @Html.TextBoxFor(m => m.Email, new { @class = "email form-control", autofocus = "autofocus", @placeholder = "Email Address" })
                                @Html.ValidationMessageFor(m => m.Email)
                            </div>
                        }
                        <div class="login-password input-group">
                            <span class="input-group-addon"><i class="fa fa-key"></i></span>
                            @Html.PasswordFor(m => m.Password, new { @class = "password form-control", @placeholder = "Password" })
                            @Html.ValidationMessageFor(m => m.Password)
                        </div>
                    </div>

                    <div class="login-remember col-xxs-12 col-xs-6 col-sm-6 col-md-6 col-lg-6 text-left">
                        @Html.CheckBoxFor(m => m.RememberMe)
                        @Html.LabelFor(m => m.RememberMe)
                    </div>

                    <div class="login-forgot col-xxs-12 col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                        @Html.RouteLink(T("Account.Login.ForgotPassword").Text, "PasswordRecovery", null, new { @class = "password-recovery", rel = "nofollow" })
                    </div>

                    <div class="login-external">
                        @Html.Action("ExternalMethods", "ExternalAuthentication")
                    </div>

                    <div class="login-submit">
                        <input class="btn btn-normal form-control login-button" type="submit" value="@T("Account.Login.LoginButton") Now" />
                    </div>


                    @if (Model.DisplayCaptcha)
                    {
                        @Html.Raw(Html.GenerateCaptcha())
                    }

                    @*@Html.Action("TopicBlock", "Topic", new { systemName = "LoginRegistrationInfo",  area = "commerce" })*@
                </div>
                <div class="col-xxs-12 col-xs-12 col-sm-6 col-md-4 col-lg-4">
                    <div class="login-signup regular">
                        <h3 class="page-title center">SpotsHUB Account</h3>
                        <p>Sign up today to gain full access to SpotsHUB online shopping & courier services.</p>
                        <a href="@registerUrl" class="btn btn-normal form-control sign-up-button" rel="nofollow">Sign Up</a>
                    </div>
                </div>
                <div class="col-xxs-12 col-xs-12 col-sm-6 col-md-4 col-lg-4">
                    <div class="login-signup business">
                        <h3 class="page-title center">Courier Invoice Account</h3>
                        <p>Semi-monthly detailed invoice billing for business users.</p>
                        <a class="btn btn-normal form-control application-form" target="_blank" href="/Content/files/SpotsHUBExpressApplication.pdf">Download Application</a>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
    }
</section>
